#include <bits/stdc++.h>

using namespace std;
//3. Deque

//deque FIFO (First In First  Out)
int data[1000], head = 500, tail = head - 1;//data[head..tail]
//队列的常见操作

//1. 初始化空队列init  head=n/2,tail=head-1;
//2a. 尾部进队 push_back data[++tail]=x;
//2b. 头部进队 push_front data[--head]=x;
//3a. 头部出队 pop_front head++;
//3b. 尾部出队 pop_back  tail--;
//4a. 查询队头front()（不弹出) data[head]
//4b. 查询队尾back()（不弹出) data[tail]
#include<vector>
#include<stack>
#include<queue>
#include<deque>

int main() {
    head = 500, tail = head - 1; //
    int t;
    for (int i = 13; i >= 1; i--) {
        if (head < tail) {
            t = data[tail];
            --tail;
            data[--head] = t;
        }

        data[--head] = i;
    }

    while (head <= tail) {
        cout << data[head] << " ";
        ++head;
    }

    return 0;
}
